#define _CRT_SECURE_NO_WARNINGS 1
#include"BSTree.h"

int main()
{
	int a[] = { 8, 3, 1, 10, 6, 4, 7, 14, 13 ,16};
	BSTree<int> tree;
	for (int i = 0; i < sizeof(a)/sizeof(a[0]); i++)
	{
		tree.Insert(a[i]);
	}
	tree.InOrder();
	cout << tree.Find(11) << endl;
	//tree.Erase(3);
	//tree.InOrder();
	//tree.Erase(8);
	//tree.InOrder();
	//tree.Erase(4);
	//tree.InOrder();
	for (auto e : a)
	{
		tree.Erase(e);
		tree.InOrder();
	}
	return 0;
} 